import Vue from 'vue'
import Vuex from 'vuex'
import axios from 'axios'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    uname:""
  },
  mutations: {
    setUname(state,uname){
      state.uname=uname;
    }
  },
  actions: {
    login(context,user){
      (async function(){
      var result=await axios.get("/user/signin",{
        params:user
      })
      console.log(result);
    })()
    }
  },
  modules: {
  }
})
